const log = function (content) {
    const fs = require('fs')
    const moment = require('moment')
    let time = moment().format('YYYYMMDD HH:mm:ss')
    let filename = moment().format('YYYYMMDD')
    let c = time + '    ' + content + '\n'
    fs.appendFile(`./logs/${filename}.log`, c, function () {
        console.log('--------------------------------------------------------------------------------------------------------\n日志输出成功\n--------------------------------------------------------------------------------------------------------')
    })
}

module.exports = log
